package com.xbongbong.saas.model;

import com.xbongbong.paas.domain.entity.PaasFormSubDataEntity;
import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.domain.entity.UpdateDataEntity;
import com.xbongbong.saas.domain.entity.ClueSubDataEntity;
import com.xbongbong.saas.domain.entity.ClueSubDataEntity;
import org.elasticsearch.action.support.WriteRequest;

import java.util.List;
import java.util.Map;

/**
 * @author long
 * @version v1.0
 * @date 2020/12/14 19:06
 * @since v1.0
 */
public interface ClueSubDataModel extends IModel<ClueSubDataEntity> {

    @Override
    Integer insert(ClueSubDataEntity entity) throws XbbException;

    @Override
    Integer update(ClueSubDataEntity entity) throws XbbException;

    @Override
    List<ClueSubDataEntity> findEntitys(Map<String, Object> param);

    @Override
    Integer getEntitysCount(Map<String, Object> param);

    Integer insertBatch(List<ClueSubDataEntity> customerSubDataEntities) throws XbbException;

    List<ClueSubDataEntity> getByDataId(Long dataId, String corpid);

    List<ClueSubDataEntity> getByDataIds(List<Long> dataIds, String corpid, DelEnum delEnum);

    Integer updateBatch(List<UpdateDataEntity> updateDataList, String corpid) throws XbbException;

    void restoreBatch(List<Long> dataIds, String corpid) throws XbbException;

    Integer deleteBatchByDataId(List<Long> dataIds, String corpid, DelEnum delEnum) throws XbbException;

    Integer deleteBatch(String corpid, List<ClueSubDataEntity> clueSubDataEntities, WriteRequest.RefreshPolicy refreshPolicy) throws XbbException;

    Integer deleteByDataId(Long dataId, String corpid) throws XbbException;

    Integer updateDel(List<ClueSubDataEntity> updateDelList, String corpid, WriteRequest.RefreshPolicy refreshPolicy, DelEnum delEnum) throws XbbException;

    Integer updateBatchByEntity(List<? extends PaasFormSubDataEntity> list, String corpid) throws XbbException;
}
